#ifndef _CUSTOM_DATA_TYPE_H_
#define _CUSTOM_DATA_TYPE_H_

#include <stdint.h>

typedef struct updateCloudStoreDone
{
    uint8_t bucketName[24]; 
    uint8_t filePath[128]; 
    uint32_t  fileSize;     
    uint32_t uploadTime;
    uint8_t storetype;    // 0 -> aws , 1 -> QiNiu 
    uint32_t ts;
    uint8_t sign[32];     // sha256(deviceid + ts + apikey)
    uint8_t eventid[16];  // 20160919125959
} UPDATE_CLOUD_RESULT; 

typedef struct updateStorageInfo
{
    uint32_t total;  // total 4000 == 4000MB == 4G
    uint32_t remain; // 2000 == 2000MB == 2G remain to be used.
} STORAGE_INFO; 

typedef struct updateAlertInfo
{
    uint32_t num;
    uint32_t time;
    uint32_t type;
} ALERT_INFO;

typedef struct cloudStoreParam
{
    uint8_t captureNumber; // 3 -> 3 pictures/once
    uint8_t lengthOfVideo; // 20 -> max 20s a video
    uint8_t uploadLimit;   // 20 -> 20 minutes time, uploud once
    uint8_t storeType;     // 0 -> aws , 1 -> QiNiu 
    uint8_t storeAppid[50]; 
    uint8_t storeAppSecret[50]; 
    uint8_t callbackUrl[128];
    uint8_t callbackHost[16];
    uint8_t callbackBody[256];
    uint8_t bucketName[24]; 
    uint8_t filePath[128];   
    uint8_t persistentPipeline[32];
    uint8_t persistentOps[256];
    uint8_t persistentNotifyUrl[80];
    int32_t deleteAfterDays;
} CLOUD_STORE_PARAM;

typedef struct stationInfo
{
    uint8_t ip_add[16];  // example:192.168.200.105
    uint8_t mac_add[20]; // example:B0:D5:9D:53:E7:FF
} STATION_INFO;

typedef struct p2pInfo
{
    uint8_t serverName[256];  
    uint8_t account[64]; 
    uint8_t license[32]; 
} P2P_INFO;

#endif
